home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 2 / 002.d81 / mc test maker (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  96 lines

  1. 1 rem multiple choice test maker
  2. 2 poke783,peek(783)and254:print""
  3. 5 printchr$(147):gosub5000:printchr$(147)
  4. 10 input"number of questions  ";nu:print
  5. 12 printchr$(147)
  6. 15 dimwd$(nu),s1$(nu),s2$(nu),s3$(nu),cn$(nu)
  7. 20 forx=1tonu
  8. 30 input"question ";wd$(x):print
  9. 40 input"choice a ";s1$(x):print
  10. 50 input"choice b ";s2$(x):print
  11. 60 input"choice c ";s3$(x):print
  12. 70 input"answer (a-c) ";cn$(x)
  13. 72 ifcn$(x)="a"orcn$(x)="b"orcn$(x)="c"thengoto75
  14. 73 print"[145][145]":goto70
  15. 75 printchr$(147)
  16. 80 next
  17. 90 printchr$(147)
  18. 100 forx=1tonu
  19. 105 printchr$(147)
  20. 110 poke781,1:poke782,0:sys65520:print"1. question  ";wd$(x):print
  21. 120 poke781,3:poke782,0:sys65520:print"2. choice a  ";s1$(x):print
  22. 130 poke781,5:poke782,0:sys65520:print"3. choice b  ";s2$(x):print
  23. 140 poke781,7:poke782,0:sys65520:print"4. choice c  ";s3$(x):print
  24. 150 poke781,9:poke782,0:sys65520:print"5. correct answer ";cn$(x)
  25. 160 poke781,23:poke782,0:sys65520:print"is this correct (y/n)?[160]";
  26. 170 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"then170
  27. 180 ifa$="y"then 260
  28. 190 poke781,23:poke782,0:sys65520:print"enter number to change - ";
  29. 200 poke198,0:wait198,1:geta$:a=val(a$)
  30. 210 ifa<1ora>5then190
  31. 220 ifa=1thenpoke781,1:poke782,11:sys65520:inputwd$(x):goto160
  32. 230 ifa=2thenpoke781,3:poke782,11:sys65520:inputs1$(x):goto160
  33. 240 ifa=3thenpoke781,5:poke782,11:sys65520:inputs2$(x):goto160
  34. 245 ifa=4thenpoke781,7:poke782,11:sys65520:inputs3$(x):goto160
  35. 250 ifa=5thenpoke781,9:poke782,18:sys65520:inputcn$(x)
  36. 252 ifcn$(x)="a"orcn$(x)="b"orcn$(x)="c"then160
  37. 254 goto250
  38. 260 next
  39. 900 printchr$(147)
  40. 910 print"enter file name (9 character limit)
  41. 912 [153]"(x to exit)"
  42. 920 [133]fi$:[139]fi$[178]"x"[167]2000
  43. 930 [151]781,23:[151]782,1:[158]65520:[153]"is this correct (y/n)?close";
  44. 940 [151]198,0:[146]198,1:[161]a$
  45. 950 [139]a$[178]"y"[167]1000
  46. 960 [139]a$[178]"n"[167]900
  47. 970 [137]930
  48. 1000 [159]4,8,4,"0:"[170]fi$[170]",seq,write"
  49. 1010 [152]4,nu
  50. 1020 [129]x[178]1[164]nu
  51. 1030 [152]4,wd$(x)
  52. 1040 [152]4,s1$(x)
  53. 1050 [152]4,s2$(x)
  54. 1060 [152]4,s3$(x)
  55. 1070 [152]4,cn$(x)
  56. 1080 [130]
  57. 1090 [160]4
  58. 2000 [153][199](147)
  59. 2010 [153]"do you want to create another file      (y/n)?close";
  60. 2020 [151]198,0:[146]198,1:[161]a$
  61. 2030 [139]a$[178]"y"[167][156]:[153][199](147):[137]10
  62. 2040 [139]a$[179][177]"n"[167]2000
  63. 2050 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
  64. 2055 [151]631,13:[151]632,13:[151]198,2
  65. 2060 [128]
  66. 4997 :
  67. 4998 [143] title page and instructions
  68. 4999 :
  69. 5000 [153][199](147):[151]53272,23
  70. 5010 [151]781,5:[151]782,7:[158]65520:[153]"(NULL)(NULL)(NULL)(NULL)right$(NULL)(NULL)valcloselenleft$(NULL)right$lenvalclose(NULL)val(NULL)(NULL) (NULL)atn(NULL)val(NULL)"
  71. 5020 [151]781,8:[151]782,19:[158]65520:[153]"by"
  72. 5030 [151]781,11:[151]782,13:[158]65520:[153]"str$onna (NULL). (NULL)oody"
  73. 5040 [151]781,23:[151]782,7:[158]65520:[153]"(NULL)(NULL)val(NULL)(NULL) (NULL)(NULL)atnlenval peekatn(NULL) (NULL)(NULL) len(NULL)(NULL)(NULL)right$(NULL)(NULL)val.";
  74. 5050 [151]198,0:[146]198,1:[161]a$
  75. 5060 [153][199](147)
  76. 5070 [153]"   (NULL)his program is designed to help":[153]
  77. 5080 [153]"you create text files for (NULL)(NULL)(NULL)(NULL)right$(NULL)(NULL)val":[153]
  78. 5090 [153]"lenleft$(NULL)right$lenval (NULL)val(NULL)(NULL)val(NULL).":[153]
  79. 5100 [153]"   (NULL)ou will be asked for the number of":[153]
  80. 5110 [153]"questions that will be in the test.":[153]
  81. 5120 [153]"(NULL)hen you will be asked for the question":[153]
  82. 5130 [153]"and for three possible answers.  (NULL)ou":[153]
  83. 5140 [153]"will then enter the correct choice as":[153]
  84. 5150 [153]"a letter (atn-len).":[153]
  85. 5160 [151]781,23:[151]782,7:[158]65520:[153]"(NULL)(NULL)val(NULL)(NULL) (NULL)(NULL)atnlenval peekatn(NULL) (NULL)(NULL) len(NULL)(NULL)(NULL)right$(NULL)(NULL)val.";
  86. 5170 [151]198,0:[146]198,1:[161]a$
  87. 5190 [153][199](147):[153]"   (NULL)his program could easily be":[153]
  88. 5200 [153]"modified to create text files for any":[153]
  89. 5210 [153]"program that uses sequential text":[153]
  90. 5220 [153]"files.  (NULL)ist the program and study how":[153]
  91. 5230 [153]"it is written to see what you'll need":[153]
  92. 5240 [153]"to change.":[153]
  93. 5250 [151]781,23:[151]782,7:[158]65520:[153]"(NULL)(NULL)val(NULL)(NULL) (NULL)(NULL)atnlenval peekatn(NULL) (NULL)(NULL) len(NULL)(NULL)(NULL)right$(NULL)(NULL)val.";
  94. 5260 [151]198,0:[146]198,1:[161]a$
  95. 5270 [151]53272,21:[142]
  96.